#ifndef _BOOTLOADER_H_
#define _BOOTLOADER_H_
/*private include********************************************************************/
#include "stm32l0xx_hal.h"
/*private define*******************************************************************/
#define CURRENT_FIRMWARE_ADDRESS  0x08003000	//APP start address, according to the size of bootloader 
#define CURRENT_FIRMWARE_VERSION_INFO_ADDRESS (CURRENT_FIRMWARE_ADDRESS - 4)

#define NEW_FIRMWARE_ADDRESS      0x08007000 // 
#define NEW_FIRMWARE_VERSION_INFO_ADDRESS   (NEW_FIRMWARE_ADDRESS - 4)

typedef  void (*pFunction)(void);

typedef struct _firmware_info_t{
  uint32_t version_info;
  uint32_t firmware_size;
} firmware_info_t;

/*private function*******************************************************************/
void bootloader_check_firmware_update(void);
#endif //_BOOTLOADER_H_

